package gwtool.gui.ueberDialog;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JDialog;
import javax.swing.WindowConstants;

public class UeberController implements ActionListener {

	private UeberPanel panel = null;

	private JDialog dialog = null;

	public UeberController() {

		dialog = new JDialog();
		dialog.setSize(400, 300);
		panel = new UeberPanel(this);
		dialog.add(panel);
		dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		dialog.setLocationRelativeTo(null);
		dialog.setTitle("über GW-Tool");
		dialog.setVisible(true);
	}

	@Override
	public void actionPerformed(ActionEvent e) {

		if (e.getSource() == panel.getBtnSchlieen()) {
			dialog.dispose();
		}
	}
}
